Better annotate interprocess_exception#3
Conversation
|
A new Pull Request was created by @Dr15Jones (Chris Jones) for branch cms/v1.80.0. @cmsbuild, @smuzaffar, @aandvalenzuela, @iarspider can you please review it and eventually sign? Thanks. |
|
@smuzaffar I compiled all CMSSW code that includes |
| //trying to open, and tried MaxCreateOrOpenTries times. Something fishy | ||
| //is happening here and we can't solve it | ||
| throw interprocess_exception(error_info(corrupted_error)); | ||
| throw interprocess_exception(error_info(corrupted_error), "file exists when create but not when open"); |
There was a problem hiding this comment.
| throw interprocess_exception(error_info(corrupted_error), "file exists when create but not when open"); | |
| throw interprocess_exception(error_info(corrupted_error), "do_create_else_open: file exists when trying to create, but not when trying to open"); |
There was a problem hiding this comment.
For consistency with the other cases where you mention the function name explicitly.
| @@ -1,4 +1,4 @@ | |||
| ////////////////////////////////////////////////////////////////////////////// | |||
| ///////////////////////////////////////////////////////////////////////////// | |||
| { | ||
| error_info err(other_error); | ||
| throw interprocess_exception(err); | ||
| throw interprocess_exception(err, "semaphore_open unknown type"); |
There was a problem hiding this comment.
| throw interprocess_exception(err, "semaphore_open unknown type"); | |
| throw interprocess_exception(err, "semaphore_open: unknown type"); |
| //Check for error | ||
| if(handle == BOOST_INTERPROCESS_POSIX_SEM_FAILED){ | ||
| throw interprocess_exception(error_info(errno)); | ||
| throw interprocess_exception(error_info(errno),"semaphore_open sem_open failed"); |
There was a problem hiding this comment.
| throw interprocess_exception(error_info(errno),"semaphore_open sem_open failed"); | |
| throw interprocess_exception(error_info(errno),"semaphore_open: sem_open failed"); |
| if(ret == -1){ | ||
| error_info err = system_error_code(); | ||
| throw interprocess_exception(err); | ||
| throw interprocess_exception(err, "semaphore_unlink sem_init failed"); |
There was a problem hiding this comment.
| throw interprocess_exception(err, "semaphore_unlink sem_init failed"); | |
| throw interprocess_exception(err, "semaphore_init: sem_init failed"); |
0dcaab1 to
777347c
Compare
|
Pull request #3 was updated. |
Avoid case where exception message is just "boost::interprocess_exception::library_error"
777347c to
fc6a197
Compare
|
Pull request #3 was updated. |
|
One thing of note is from looking at the code, it looks like the message |
|
test parameters:
|
|
please test |
|
+externals |
|
This pull request is fully signed and it will be integrated in one of the next cms/v1.80.0 IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
The IBs with the external generator process are periodically failing with the unhelpful error message
That message happens when
boost::interprocess_exceptionconstructor is passed an error_info that is set to 0 AND the constructor is not passed aconst char*. I went and modified all the places our code might reach a function that callsboost::interprocess_exceptionand forces it to also pass aconst char*saying why the exception is being thrown.Hopefully this will help track down the problems we see ever so often.